package cn.kgc.springday04.service.impl;

import cn.kgc.springday04.dao.UserDao;
import cn.kgc.springday04.entity.User;
import cn.kgc.springday04.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/14
 * @Description:   userServiceImpl
 */
@Service("userService2")
public class UserServiceImpl2 implements UserService {

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Autowired
    private UserDao userDao;

    @Override
    public Boolean login() {
        System.out.println("===========UserServiceImpl2=============");
        User user =  userDao.selectByName();
        return user!=null;
    }
}
